import request from '@/utils/request'

// 查看月卡列表
export function cardList(params) {
  return request({
    url: '/parking/card/list',
    params
  })
}

// 添加月卡
export function addCard(data) {
  return request({
    url: '/parking/card',
    method: 'post',
    data
  })
}
// 编辑月卡
export function editCard(data) {
  return request({
    url: '/parking/card/edit',
    method: 'put',
    data
  })
}
// 获取编辑页月卡详情
export function cardDetail(id) {
  return request({
    url: `/parking/card/detail/${id}`
  })
}
// 删除月卡
export function delCard(ids) {
  return request({
    url: `/parking/card/${ids}`,
    method: 'delete'
  })
}
// 月卡续费
export function renew(data) {
  return request({
    url: '/parking/card/recharge',
    method: 'post',
    data
  })
}

